TARGET = $(LIB)libinotify.a
DEBUG_TARGET = $(LIB)libdebug_inotify.a

#All
.PHONY: all
all: $(TARGET)
$(TARGET): $(TARGET)(event_watcher.o event_handler.o)
event_watcher.o: event_watcher.c event_watcher.h event_handler.h event_handler.c
	$(CC) -c -I$(CONFIG_SRC) -I$(UTILITY_SRC) -I$(INCLUDE) -I. event_watcher.c 
event_handler.o: event_handler.c event_handler.h
	$(CC) -c -I$(CONFIG_SRC) -I$(UTILITY_SRC) -I$(INCLUDE) -I. event_handler.c

#Debug
.PHONY: debug
debug: $(DEBUG_TARGET)
$(DEBUG_TARGET): $(DEBUG_TARGET)(debug_event_watcher.o debug_event_handler.o)
debug_event_watcher.o: event_watcher.c event_watcher.h event_handler.h event_handler.c
	$(CC) -c $(DEBUG_FLAGS) -o debug_event_watcher.o -I$(CONFIG_SRC) -I$(UTILITY_SRC) -I$(INCLUDE) -I. event_watcher.c 
debug_event_handler.o: event_handler.c event_handler.h
	$(CC) -c $(DEBUG_FLAGS) -o debug_event_handler.o -I$(CONFIG_SRC) -I$(UTILITY_SRC) -I$(INCLUDE) -I. event_handler.c

#Clean
.PHONY: clean
clean:
	-rm *.o $(TARGET) $(DEBUG_TARGET)

